#!/bin/bash

# This script is used to get local IP address.

# get local IP address
get_local_ip() {
    local_ip=$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1' | head -n 1)

    echo "Local IP Address: $local_ip"
}

main() {
    get_local_ip
}

main